package com.yytek.common.client.net.model;


import com.yytek.common.client.net.model.base.BaseMqttRequest;

import java.util.Map;

/**
 * 子设备服务调用
 */
public class SubServiceInvoke extends BaseMqttRequest {
    /**
     * 子设备产品id
     */
    private String productKey;
    /**
     *子设备设备名称
     */
    private String deviceName;

    /**
     * 服务调用参数。包含服务标识符和服务的值
     */
    private Map<String, Object> inputParam;

    String serrviceIdentifier = "sub.service.invoke.${identifier}";
    /**
     * 设置调用服务名称
     * @param method
     */
    @Override
    public void setMethod(String method) {
        //替换方法名称
        method = serrviceIdentifier.replace("${identifier}",method);
        super.setMethod(method);
    }

    public String getProductKey() {
        return productKey;
    }

    public void setProductKey(String productKey) {
        this.productKey = productKey;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Map<String, Object> getInputParam() {
        return inputParam;
    }

    public void setInputParam(Map<String, Object> inputParam) {
        this.inputParam = inputParam;
    }

}
